/PROG  PNS0190
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "CE SHI";
PROG_SIZE	= 4675;
CREATE		= DATE 18-06-24  TIME 08:43:36;
MODIFIED	= DATE 19-11-26  TIME 22:09:40;
FILE_NAME	= PNS0037;
VERSION		= 0;
LINE_COUNT	= 177;
MEMORY_SIZE	= 5199;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0190 ;
   7:  !  PART:51947408/09  ;
   8:  !  AUTHOR:HL ;
   9:  !******************************** ;
  10:   ;
  11:  !INITIALIZE ;
  12:  MOVE TO HOME    ;
  13:  R[14]=75    ;
  14:  R[18]=1    ;
  15:  R[19]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  29:   ;
  30:  R[1]=0    ;
  31:  TIMER[1]=RESET ;
  32:  TIMER[1]=START ;
  33:   ;
  34:  LBL[10:TOP OF LOOF] ;
  35:  OVERRIDE=R[5] ;
  36:   ;
  37:  TIMER[3]=STOP ;
  38:  TIMER[2]=STOP ;
  39:  R[1]=R[1]+1    ;
  40:  R[2]=TIMER[2]    ;
  41:  R[3]=60/R[2]    ;
  42:  R[8]=TIMER[3]    ;
  43:  TIMER[2]=RESET ;
  44:  TIMER[2]=START ;
  45:  TIMER[3]=RESET ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON AND DI[40]=ON,JMP LBL[110] ;
  50:   ;
  51:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[120] ;
  52:   ;
  53:  IF DI[1]=ON AND DI[3]=ON AND DI[40]=ON,JMP LBL[130] ;
  54:  IF DI[29]=ON,JMP LBL[90] ;
  55:  JMP LBL[20] ;
  56:   ;
  57:  LBL[110:L R PART] ;
  58:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON AND DI[40]=ON    ;
  59:  TIMER[3]=START ;
  60:  R[5]=100    ;
  61:  OVERRIDE=R[5] ;
  62:J P[3:PICK APPROACH] 100% CNT20 ACC100    ;
  63:   ;
  64:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  65:  PAYLOAD[4] ;
  66:  CALL CHK_PICK    ;
  67:  MONITOR Z_CHECH ;
  68:J P[5:PICK DEPART] 100% CNT0 ACC100    ;
  69:  DO[8]=PULSE,1.0sec ;
  70:  DO[42]=PULSE,0.5sec ;
  71:J P[6] 100% CNT70 ACC100    ;
  72:  MONITOR END Z_CHECH ;
  73:  WAIT DI[39]=OFF    ;
  74:J P[14:DROP R PART] 100% CNT5 ACC100 TB R[19]sec,CALL PARTDROP_R    ;
  75:  DO[41]=PULSE,1.0sec ;
  76:J P[16:PICK L DEPART] 100% CNT30 ACC100    ;
  77:J P[15:CLEAR L PART] 100% CNT100 ACC100    ;
  78:  IF DI[43]=ON,JMP LBL[115] ;
  79:  JMP LBL[30] ;
  80:  LBL[115:LAST BLANK] ;
  81:  DO[43]=PULSE,1.0sec ;
  82:  JMP LBL[30] ;
  83:   ;
  84:   ;
  85:  LBL[120:PICK R PART] ;
  86:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  87:  TIMER[3]=START ;
  88:  OVERRIDE=R[5] ;
  89:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
  90:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK_R ACC100 BREAK    ;
  91:  PAYLOAD[4] ;
  92:J P[5:PICK DEPART] 100% CNT40 ACC100    ;
  93:  CALL CHECKPICK_R    ;
  94:  DO[8]=PULSE,1.0sec ;
  95:  WAIT DI[39]=OFF    ;
  96:J P[6] 100% CNT100    ;
  97:J P[14:DROP R PART] 100% CNT5 ACC100 TB R[19]sec,CALL PARTDROP_R    ;
  98:  DO[41]=PULSE,0.5sec ;
  99:J P[16:PICK L DEPART] 100% CNT100 ACC100    ;
 100:J P[2:PICK POUNCE] 100% CNT100    ;
 101:  IF DI[1]=ON AND DI[3]=ON AND DI[43]=ON,JMP LBL[121] ;
 102:  JMP LBL[122] ;
 103:  LBL[122:NOT LAST BLANK] ;
 104:J P[2:PICK POUNCE] 50% CNT100 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
 105:  JMP LBL[20] ;
 106:   ;
 107:  LBL[121:IS LAST BLANK] ;
 108:J P[2:PICK POUNCE] 50% CNT100 ACC100 TA    .10sec,DO[43]=PULSE,1.0sec    ;
 109:  JMP LBL[20] ;
 110:   ;
 111:  LBL[130:PICK L PART] ;
 112:  WAIT DI[1]=ON AND DI[3]=ON AND DI[40]=ON    ;
 113:  TIMER[3]=START ;
 114:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
 115:   ;
 116:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK_L ACC100 BREAK    ;
 117:  PAYLOAD[4] ;
 118:  CALL CHECKPICK_L    ;
 119:  MONITOR Z_CHECH_L ;
 120:J P[5:PICK DEPART] 100% CNT70 ACC100    ;
 121:  DO[42]=PULSE,1.0sec ;
 122:J P[15:CLEAR L PART] 100% CNT100 ACC100 TA    .20sec,DO[5]=PULSE,1.0sec    ;
 123:  JMP LBL[30] ;
 124:   ;
 125:   ;
 126:   ;
 127:  LBL[30:GOTO DROP POUNCE] ;
 128:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
 129:   ;
 130:  TIMER[3]=STOP ;
 131:  LBL[40:AT DROP POUNCE] ;
 132:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
 133:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
 134:  IF DI[18]=ON,JMP LBL[60] ;
 135:  JMP LBL[40] ;
 136:   ;
 137:  LBL[50:MOVE DROP SNEAK] ;
 138:  TIMER[3]=START ;
 139:  OVERRIDE=R[5] ;
 140:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
 141:  LBL[51:DROP OR C-P-S] ;
 142:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
 143:  IF DI[18]=ON,JMP LBL[40] ;
 144:  JMP LBL[51] ;
 145:  JMP LBL[50] ;
 146:   ;
 147:  LBL[60:MOVE CLS-PRS-ACC] ;
 148:J P[1:MIDDLE] 50% CNT100 ACC100    ;
 149:  PAUSE ;
 150:  JMP LBL[30] ;
 151:   ;
 152:  LBL[80:DROP ENABLED] ;
 153:  !PROCEED TO DROP ;
 154:  TIMER[3]=START ;
 155:  OVERRIDE=R[5] ;
 156:J P[10:DROP APPROACH] 100% CNT30 ACC100    ;
 157:  MONITOR END Z_CHECH_L ;
 158:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 159:  DO[6]=PULSE,1.0sec ;
 160:  PAYLOAD[3] ;
 161:  CALL CHK_DROP    ;
 162:   ;
 163:J P[12:DROP DEPART] 100% CNT50 ACC100    ;
 164:J P[13:DROP CLEAR] 100% CNT100 ACC100    ;
 165:  DO[7]=PULSE,1.0sec ;
 166:  !GOTO PICK POUNCE ;
 167:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 168:  IF DI[29]=ON,JMP LBL[90] ;
 169:  JMP LBL[10] ;
 170:   ;
 171:  LBL[90:END OF CYCLE] ;
 172:  TIMER[1]=STOP ;
 173:  R[4]=TIMER[1]    ;
 174:J P[1:MIDDLE] 50% CNT100    ;
 175:  MOVE TO HOME    ;
 176:   ;
 177:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -901.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.355  mm,	Y =  1179.900  mm,	Z =  -901.041  mm,
	W =   179.324 deg,	P =     1.370 deg,	R =   150.803 deg,
	E1=   135.022 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2634.466  mm,	Y =  3241.333  mm,	Z =  -856.318  mm,
	W =   179.307 deg,	P =     -.655 deg,	R =    89.130 deg,
	E1=   196.307 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2634.466  mm,	Y =  3241.333  mm,	Z = -1028.959  mm,
	W =   179.307 deg,	P =     -.655 deg,	R =    89.130 deg,
	E1=   196.307 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2634.465  mm,	Y =  3241.333  mm,	Z =  -805.758  mm,
	W =   179.307 deg,	P =     -.655 deg,	R =    89.130 deg,
	E1=   196.307 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2646.464  mm,	Y =  3237.972  mm,	Z =  -804.955  mm,
	W =  -179.777 deg,	P =    -5.001 deg,	R =    89.053 deg,
	E1=    16.126 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,	
	J1=     2.787 deg,	J2=   -21.469 deg,	J3=    59.541 deg,
	J4=      .551 deg,	J5=   -57.742 deg,	J6=   188.217 deg,
	E1=    83.776 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2234.325  mm,	Y =  -917.617  mm,	Z =  -864.397  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -148.324 deg,
	E1=   192.279 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2647.258  mm,	Y = -3240.845  mm,	Z =  -879.306  mm,
	W =   179.417 deg,	P =     -.645 deg,	R =   -92.889 deg,
	E1=   198.680 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2647.256  mm,	Y = -3240.845  mm,	Z =  -937.226  mm,
	W =   179.417 deg,	P =     -.645 deg,	R =   -92.889 deg,
	E1=   198.680 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2647.258  mm,	Y = -3240.845  mm,	Z =  -879.306  mm,
	W =   179.417 deg,	P =     -.645 deg,	R =   -92.889 deg,
	E1=   198.680 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2043.417  mm,	Y =  -966.069  mm,	Z =  -889.078  mm,
	W =  -179.114 deg,	P =      .402 deg,	R =  -159.397 deg,
	E1=   162.271 deg
};
P[14:"DROP R PART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2646.463  mm,	Y =  3237.971  mm,	Z =  -928.955  mm,
	W =  -179.777 deg,	P =    -5.001 deg,	R =    89.053 deg,
	E1=    16.126 deg
};
P[15:"CLEAR L PART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1995.805  mm,	Y =   612.943  mm,	Z =  -898.818  mm,
	W =   179.636 deg,	P =     1.663 deg,	R =   174.237 deg,
	E1=    72.481 deg
};
P[16:"PICK L DEPART"]{
   GP1:
	UF : 0, UT : 1,	
	J1=    36.132 deg,	J2=   -24.223 deg,	J3=    55.914 deg,
	J4=    -2.379 deg,	J5=   -54.699 deg,	J6=    54.284 deg,
	E1=    16.125 deg
};
/END
